<?php


if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class RequestAcceptTest extends UnitTestCase
{
    function testingRequestAccept()
    {
        $struct = new Entity\RequestAccept();
        
        $this->assertIdentical($struct,new Entity\RequestAccept);
        $this->assertTrue($struct instanceof Entity\RequestAccept);
        
        $struct->types = 'php';
        $this->assertEqual( 'php', $struct->types);
        $struct->charsets = 'ezc';
        $this->assertEqual( 'ezc', $struct->charsets);
        $struct->languages = 'ezp';
        $this->assertEqual( 'ezp', $struct->languages);
        $struct->encodings = 'buddymiles';
        $this->assertEqual( 'buddymiles', $struct->encodings);
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'types' => 'php',
        'charsets' => 'ezc',
        'languages' => 'ezp',
        'encodings' => 'buddymiles',
        );
        
        $struct = Entity\RequestAccept::__mock( $state );
        
        $this->assertEqual( 'php', $struct->types);
        $this->assertEqual( 'ezc', $struct->charsets);
        $this->assertEqual( 'ezp', $struct->languages);
        $this->assertEqual( 'buddymiles', $struct->encodings);
    }
}

